<template>
	<view class="conn">
		<navbox title="详情"></navbox>
		<view class="top">
			<view style="height: 20rpx;"></view>
			<u--text text="JUC详细教程" align="center" prefixIcon="order" iconStyle="font-size: 19px" size="20" lines="1">
			</u--text>

			<view
				style="display: flex;align-items: center;justify-content: center;margin-top: 25rpx;margin-bottom: 20rpx;">
				<view style="display: flex;align-items: center;justify-content: flex-start;font-size: 12px;">
					<view>分类：</view>
					<u-tag :text="data.name" size="mini" plain></u-tag>
				</view>
				<view style="display: flex;align-items: center;justify-content: flex-start;margin-left: 80rpx;">
					<u--text prefixIcon="eye" iconStyle="font-size: 19px" :text="data.viewCount"></u--text>
				</view>
			</view>

			<view
				style="display: flex;align-items: center;justify-content: space-around;margin-top: 20rpx;font-size: 12px;color: #595959;margin-bottom: 20rpx;">
				<view>博主：福利员~小可爱</view>
				<view>时间：{{data.createTime}}</view>
			</view>

			<image :src="data.thumbnail" style="width: 100%;"></image>
		</view>

		<view class="content">
			<zero-markdown-view :markdown="data.content"></zero-markdown-view>
		</view>

	</view>
</template>

<script>
	import navbox from '../components/navbox/navbox.vue'
	export default {
		data() {
			return {
				id: '',
				html: '### 123',
				data: {}
			}
		},
		onLoad(option) {
			this.getObj(option.id)
		},
		methods: {
			async getObj(id) {
				const res = await this.$myRuquest({
					url: '/wexinLogin/sgArticle/airtleById?id=' + id,
					method: "post"
				})
				this.data = res.data.data
			}
		},
		components: {
			"navbox": navbox
		},
	}
</script>

<style scoped lang="scss">
	.conn {
		margin-top: 180rpx;
		background-color: #f9f9f9;
		width: 100%;

		.top {
			margin-left: 20rpx;
			margin-right: 20rpx;
			background-color: #ffffff;
			border-radius: 20px;
			margin-top: 16rpx;

			image {
				border-radius: 20rpx;
			}

		}

		.content {
			margin-left: 20rpx;
			margin-right: 20rpx;
			background-color: #ffffff;
			border-radius: 20px;
			margin-top: 16rpx;
		}
	}
</style>
